<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Service extends Model
{
    use SoftDeletes;
    public static $status = [ 1 => '已通过', 0 => '待审核'];
    public static $catid = [ 22, 23, 24, 21];
    public function category()
    {
        return $this->hasOne(Category::class, 'id', 'type');
    }
    
    public function getContentAttribute($value)
    {
        return htmlspecialchars_decode($value);
    }
}
